import Vue from 'vue';
import App from './App';
import { router } from './router';
import store  from './store';
import './plugins/vant.js'
import api from './api/install'
// import api from './api'
import headers from './components/header.vue'
import FastClick from 'fastclick'
import 'amfe-flexible'
import './assets/resetui.css'
FastClick.attach(document.body)
// 修复ios聚焦困难问题
FastClick.prototype.focus = function(tragetElement){
  tragetElement.focus()
}
Vue.use(api);//注册请求
Vue.component('Headers', headers)
// Vue.prototype.$api = api
// const { mockXHR } = require('../mock')
//   mockXHR()

new Vue({
  router,
  store,
  el: '#app',
  render: h => h(App),
  mounted() {
    window.vue = this
    }
});
